package com.atgm.mall.gmmallperimall.service.impl;

import com.atgm.mall.gmmallperimall.dao.PeriGoodsImageDao;
import com.atgm.mall.gmmallperimall.entity.PeriGoodsImageEntity;
import com.atgm.mall.gmmallperimall.service.PeriGoodsImageService;
import com.atgm.mall.gmmallperimall.service.PeriGoodsService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

@Slf4j
@Service
public class PeriGoodsImageServiceImpl extends ServiceImpl<PeriGoodsImageDao, PeriGoodsImageEntity> implements PeriGoodsImageService {

    @Override
    public List<PeriGoodsImageEntity> queryImagesByPeriGoodsId(Long periGoodsId) {
        QueryWrapper<PeriGoodsImageEntity> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("peri_goods_id", periGoodsId);
        List<PeriGoodsImageEntity> list = baseMapper.selectList(queryWrapper);
        return list;
    }
}
